(0) Obligation:

Clauses:

gcd(X, Y, D) :- ','(le(X, Y), gcd_le(X, Y, D)).
gcd(X, Y, D) :- ','(gt(X, Y), gcd_le(Y, X, D)).
gcd_le(0, Y, Y).
gcd_le(s(X), Y, D) :- ','(add(s(X), Z, Y), gcd(s(X), Z, D)).
gt(s(X), s(Y)) :- gt(X, Y).
gt(s(X), 0).
le(s(X), s(Y)) :- le(X, Y).
le(0, s(Y)).
le(0, 0).
add(s(X), Y, s(Z)) :- add(X, Y, Z).
add(0, X, X).

Query: gcd(g,g,a)

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph DT10.

(2) Obligation:

Triples:

leA(s(X1), s(X2)) :- leA(X1, X2).
addE(s(X1), X2, s(X3)) :- addE(X1, X2, X3).
gtD(s(X1), s(X2)) :- gtD(X1, X2).
gcdB(s(X1), s(X2), X3) :- leA(X1, X2).
gcdB(s(X1), s(X2), X3) :- ','(lecA(X1, X2), addE(X1, X4, X2)).
gcdB(s(X1), s(X2), X3) :- ','(lecA(X1, X2), ','(addcC(X1, X4, X2), gcdB(s(X1), X4, X3))).
gcdB(X1, X2, X3) :- gtD(X1, X2).
gcdB(X1, s(X2), X3) :- ','(gtcD(X1, s(X2)), addE(s(X2), X4, X1)).
gcdB(X1, s(X2), X3) :- ','(gtcD(X1, s(X2)), ','(addcE(s(X2), X4, X1), gcdB(s(X2), X4, X3))).

Clauses:

lecA(s(X1), s(X2)) :- lecA(X1, X2).
lecA(0, s(X1)).
lecA(0, 0).
gcdcB(s(X1), s(X2), X3) :- ','(lecA(X1, X2), ','(addcC(X1, X4, X2), gcdcB(s(X1), X4, X3))).
gcdcB(0, s(X1), s(X1)).
gcdcB(0, 0, 0).
gcdcB(X1, 0, X1) :- gtcD(X1, 0).
gcdcB(X1, s(X2), X3) :- ','(gtcD(X1, s(X2)), ','(addcE(s(X2), X4, X1), gcdcB(s(X2), X4, X3))).
addcE(s(X1), X2, s(X3)) :- addcE(X1, X2, X3).
addcE(0, X1, X1).
gtcD(s(X1), s(X2)) :- gtcD(X1, X2).
gtcD(s(X1), 0).
addcC(X1, X2, X3) :- addcE(X1, X2, X3).

Afs:

gcdB(x1, x2, x3)  =  gcdB(x1, x2)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:
gcdB_in: (b,b,f)
leA_in: (b,b)
lecA_in: (b,b)
addE_in: (b,f,b)
addcC_in: (b,f,b)
addcE_in: (b,f,b)
gtD_in: (b,b)
gtcD_in: (b,b)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

GCDB_IN_GGA(s(X1), s(X2), X3) → U4_GGA(X1, X2, X3, leA_in_gg(X1, X2))
GCDB_IN_GGA(s(X1), s(X2), X3) → LEA_IN_GG(X1, X2)
LEA_IN_GG(s(X1), s(X2)) → U1_GG(X1, X2, leA_in_gg(X1, X2))
LEA_IN_GG(s(X1), s(X2)) → LEA_IN_GG(X1, X2)
GCDB_IN_GGA(s(X1), s(X2), X3) → U5_GGA(X1, X2, X3, lecA_in_gg(X1, X2))
U5_GGA(X1, X2, X3, lecA_out_gg(X1, X2)) → U6_GGA(X1, X2, X3, addE_in_gag(X1, X4, X2))
U5_GGA(X1, X2, X3, lecA_out_gg(X1, X2)) → ADDE_IN_GAG(X1, X4, X2)
ADDE_IN_GAG(s(X1), X2, s(X3)) → U2_GAG(X1, X2, X3, addE_in_gag(X1, X2, X3))
ADDE_IN_GAG(s(X1), X2, s(X3)) → ADDE_IN_GAG(X1, X2, X3)
U5_GGA(X1, X2, X3, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, X3, addcC_in_gag(X1, X4, X2))
U7_GGA(X1, X2, X3, addcC_out_gag(X1, X4, X2)) → U8_GGA(X1, X2, X3, gcdB_in_gga(s(X1), X4, X3))
U7_GGA(X1, X2, X3, addcC_out_gag(X1, X4, X2)) → GCDB_IN_GGA(s(X1), X4, X3)
GCDB_IN_GGA(X1, X2, X3) → U9_GGA(X1, X2, X3, gtD_in_gg(X1, X2))
GCDB_IN_GGA(X1, X2, X3) → GTD_IN_GG(X1, X2)
GTD_IN_GG(s(X1), s(X2)) → U3_GG(X1, X2, gtD_in_gg(X1, X2))
GTD_IN_GG(s(X1), s(X2)) → GTD_IN_GG(X1, X2)
GCDB_IN_GGA(X1, s(X2), X3) → U10_GGA(X1, X2, X3, gtcD_in_gg(X1, s(X2)))
U10_GGA(X1, X2, X3, gtcD_out_gg(X1, s(X2))) → U11_GGA(X1, X2, X3, addE_in_gag(s(X2), X4, X1))
U10_GGA(X1, X2, X3, gtcD_out_gg(X1, s(X2))) → ADDE_IN_GAG(s(X2), X4, X1)
U10_GGA(X1, X2, X3, gtcD_out_gg(X1, s(X2))) → U12_GGA(X1, X2, X3, addcE_in_gag(s(X2), X4, X1))
U12_GGA(X1, X2, X3, addcE_out_gag(s(X2), X4, X1)) → U13_GGA(X1, X2, X3, gcdB_in_gga(s(X2), X4, X3))
U12_GGA(X1, X2, X3, addcE_out_gag(s(X2), X4, X1)) → GCDB_IN_GGA(s(X2), X4, X3)

The TRS R consists of the following rules:

lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))
addcC_in_gag(X1, X2, X3) → U25_gag(X1, X2, X3, addcE_in_gag(X1, X2, X3))
addcE_in_gag(s(X1), X2, s(X3)) → U23_gag(X1, X2, X3, addcE_in_gag(X1, X2, X3))
addcE_in_gag(0, X1, X1) → addcE_out_gag(0, X1, X1)
U23_gag(X1, X2, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))
U25_gag(X1, X2, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
gcdB_in_gga(x1, x2, x3)  =  gcdB_in_gga(x1, x2)
s(x1)  =  s(x1)
leA_in_gg(x1, x2)  =  leA_in_gg(x1, x2)
lecA_in_gg(x1, x2)  =  lecA_in_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
0  =  0
lecA_out_gg(x1, x2)  =  lecA_out_gg(x1, x2)
addE_in_gag(x1, x2, x3)  =  addE_in_gag(x1, x3)
addcC_in_gag(x1, x2, x3)  =  addcC_in_gag(x1, x3)
U25_gag(x1, x2, x3, x4)  =  U25_gag(x1, x3, x4)
addcE_in_gag(x1, x2, x3)  =  addcE_in_gag(x1, x3)
U23_gag(x1, x2, x3, x4)  =  U23_gag(x1, x3, x4)
addcE_out_gag(x1, x2, x3)  =  addcE_out_gag(x1, x2, x3)
addcC_out_gag(x1, x2, x3)  =  addcC_out_gag(x1, x2, x3)
gtD_in_gg(x1, x2)  =  gtD_in_gg(x1, x2)
gtcD_in_gg(x1, x2)  =  gtcD_in_gg(x1, x2)
U24_gg(x1, x2, x3)  =  U24_gg(x1, x2, x3)
gtcD_out_gg(x1, x2)  =  gtcD_out_gg(x1, x2)
GCDB_IN_GGA(x1, x2, x3)  =  GCDB_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)
LEA_IN_GG(x1, x2)  =  LEA_IN_GG(x1, x2)
U1_GG(x1, x2, x3)  =  U1_GG(x1, x2, x3)
U5_GGA(x1, x2, x3, x4)  =  U5_GGA(x1, x2, x4)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)
ADDE_IN_GAG(x1, x2, x3)  =  ADDE_IN_GAG(x1, x3)
U2_GAG(x1, x2, x3, x4)  =  U2_GAG(x1, x3, x4)
U7_GGA(x1, x2, x3, x4)  =  U7_GGA(x1, x2, x4)
U8_GGA(x1, x2, x3, x4)  =  U8_GGA(x1, x2, x4)
U9_GGA(x1, x2, x3, x4)  =  U9_GGA(x1, x2, x4)
GTD_IN_GG(x1, x2)  =  GTD_IN_GG(x1, x2)
U3_GG(x1, x2, x3)  =  U3_GG(x1, x2, x3)
U10_GGA(x1, x2, x3, x4)  =  U10_GGA(x1, x2, x4)
U11_GGA(x1, x2, x3, x4)  =  U11_GGA(x1, x2, x4)
U12_GGA(x1, x2, x3, x4)  =  U12_GGA(x1, x2, x4)
U13_GGA(x1, x2, x3, x4)  =  U13_GGA(x1, x2, x4)

We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

GCDB_IN_GGA(s(X1), s(X2), X3) → U4_GGA(X1, X2, X3, leA_in_gg(X1, X2))
GCDB_IN_GGA(s(X1), s(X2), X3) → LEA_IN_GG(X1, X2)
LEA_IN_GG(s(X1), s(X2)) → U1_GG(X1, X2, leA_in_gg(X1, X2))
LEA_IN_GG(s(X1), s(X2)) → LEA_IN_GG(X1, X2)
GCDB_IN_GGA(s(X1), s(X2), X3) → U5_GGA(X1, X2, X3, lecA_in_gg(X1, X2))
U5_GGA(X1, X2, X3, lecA_out_gg(X1, X2)) → U6_GGA(X1, X2, X3, addE_in_gag(X1, X4, X2))
U5_GGA(X1, X2, X3, lecA_out_gg(X1, X2)) → ADDE_IN_GAG(X1, X4, X2)
ADDE_IN_GAG(s(X1), X2, s(X3)) → U2_GAG(X1, X2, X3, addE_in_gag(X1, X2, X3))
ADDE_IN_GAG(s(X1), X2, s(X3)) → ADDE_IN_GAG(X1, X2, X3)
U5_GGA(X1, X2, X3, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, X3, addcC_in_gag(X1, X4, X2))
U7_GGA(X1, X2, X3, addcC_out_gag(X1, X4, X2)) → U8_GGA(X1, X2, X3, gcdB_in_gga(s(X1), X4, X3))
U7_GGA(X1, X2, X3, addcC_out_gag(X1, X4, X2)) → GCDB_IN_GGA(s(X1), X4, X3)
GCDB_IN_GGA(X1, X2, X3) → U9_GGA(X1, X2, X3, gtD_in_gg(X1, X2))
GCDB_IN_GGA(X1, X2, X3) → GTD_IN_GG(X1, X2)
GTD_IN_GG(s(X1), s(X2)) → U3_GG(X1, X2, gtD_in_gg(X1, X2))
GTD_IN_GG(s(X1), s(X2)) → GTD_IN_GG(X1, X2)
GCDB_IN_GGA(X1, s(X2), X3) → U10_GGA(X1, X2, X3, gtcD_in_gg(X1, s(X2)))
U10_GGA(X1, X2, X3, gtcD_out_gg(X1, s(X2))) → U11_GGA(X1, X2, X3, addE_in_gag(s(X2), X4, X1))
U10_GGA(X1, X2, X3, gtcD_out_gg(X1, s(X2))) → ADDE_IN_GAG(s(X2), X4, X1)
U10_GGA(X1, X2, X3, gtcD_out_gg(X1, s(X2))) → U12_GGA(X1, X2, X3, addcE_in_gag(s(X2), X4, X1))
U12_GGA(X1, X2, X3, addcE_out_gag(s(X2), X4, X1)) → U13_GGA(X1, X2, X3, gcdB_in_gga(s(X2), X4, X3))
U12_GGA(X1, X2, X3, addcE_out_gag(s(X2), X4, X1)) → GCDB_IN_GGA(s(X2), X4, X3)

The TRS R consists of the following rules:

lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))
addcC_in_gag(X1, X2, X3) → U25_gag(X1, X2, X3, addcE_in_gag(X1, X2, X3))
addcE_in_gag(s(X1), X2, s(X3)) → U23_gag(X1, X2, X3, addcE_in_gag(X1, X2, X3))
addcE_in_gag(0, X1, X1) → addcE_out_gag(0, X1, X1)
U23_gag(X1, X2, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))
U25_gag(X1, X2, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
gcdB_in_gga(x1, x2, x3)  =  gcdB_in_gga(x1, x2)
s(x1)  =  s(x1)
leA_in_gg(x1, x2)  =  leA_in_gg(x1, x2)
lecA_in_gg(x1, x2)  =  lecA_in_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
0  =  0
lecA_out_gg(x1, x2)  =  lecA_out_gg(x1, x2)
addE_in_gag(x1, x2, x3)  =  addE_in_gag(x1, x3)
addcC_in_gag(x1, x2, x3)  =  addcC_in_gag(x1, x3)
U25_gag(x1, x2, x3, x4)  =  U25_gag(x1, x3, x4)
addcE_in_gag(x1, x2, x3)  =  addcE_in_gag(x1, x3)
U23_gag(x1, x2, x3, x4)  =  U23_gag(x1, x3, x4)
addcE_out_gag(x1, x2, x3)  =  addcE_out_gag(x1, x2, x3)
addcC_out_gag(x1, x2, x3)  =  addcC_out_gag(x1, x2, x3)
gtD_in_gg(x1, x2)  =  gtD_in_gg(x1, x2)
gtcD_in_gg(x1, x2)  =  gtcD_in_gg(x1, x2)
U24_gg(x1, x2, x3)  =  U24_gg(x1, x2, x3)
gtcD_out_gg(x1, x2)  =  gtcD_out_gg(x1, x2)
GCDB_IN_GGA(x1, x2, x3)  =  GCDB_IN_GGA(x1, x2)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x2, x4)
LEA_IN_GG(x1, x2)  =  LEA_IN_GG(x1, x2)
U1_GG(x1, x2, x3)  =  U1_GG(x1, x2, x3)
U5_GGA(x1, x2, x3, x4)  =  U5_GGA(x1, x2, x4)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)
ADDE_IN_GAG(x1, x2, x3)  =  ADDE_IN_GAG(x1, x3)
U2_GAG(x1, x2, x3, x4)  =  U2_GAG(x1, x3, x4)
U7_GGA(x1, x2, x3, x4)  =  U7_GGA(x1, x2, x4)
U8_GGA(x1, x2, x3, x4)  =  U8_GGA(x1, x2, x4)
U9_GGA(x1, x2, x3, x4)  =  U9_GGA(x1, x2, x4)
GTD_IN_GG(x1, x2)  =  GTD_IN_GG(x1, x2)
U3_GG(x1, x2, x3)  =  U3_GG(x1, x2, x3)
U10_GGA(x1, x2, x3, x4)  =  U10_GGA(x1, x2, x4)
U11_GGA(x1, x2, x3, x4)  =  U11_GGA(x1, x2, x4)
U12_GGA(x1, x2, x3, x4)  =  U12_GGA(x1, x2, x4)
U13_GGA(x1, x2, x3, x4)  =  U13_GGA(x1, x2, x4)

We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 4 SCCs with 13 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

GTD_IN_GG(s(X1), s(X2)) → GTD_IN_GG(X1, X2)

The TRS R consists of the following rules:

lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))
addcC_in_gag(X1, X2, X3) → U25_gag(X1, X2, X3, addcE_in_gag(X1, X2, X3))
addcE_in_gag(s(X1), X2, s(X3)) → U23_gag(X1, X2, X3, addcE_in_gag(X1, X2, X3))
addcE_in_gag(0, X1, X1) → addcE_out_gag(0, X1, X1)
U23_gag(X1, X2, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))
U25_gag(X1, X2, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
lecA_in_gg(x1, x2)  =  lecA_in_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
0  =  0
lecA_out_gg(x1, x2)  =  lecA_out_gg(x1, x2)
addcC_in_gag(x1, x2, x3)  =  addcC_in_gag(x1, x3)
U25_gag(x1, x2, x3, x4)  =  U25_gag(x1, x3, x4)
addcE_in_gag(x1, x2, x3)  =  addcE_in_gag(x1, x3)
U23_gag(x1, x2, x3, x4)  =  U23_gag(x1, x3, x4)
addcE_out_gag(x1, x2, x3)  =  addcE_out_gag(x1, x2, x3)
addcC_out_gag(x1, x2, x3)  =  addcC_out_gag(x1, x2, x3)
gtcD_in_gg(x1, x2)  =  gtcD_in_gg(x1, x2)
U24_gg(x1, x2, x3)  =  U24_gg(x1, x2, x3)
gtcD_out_gg(x1, x2)  =  gtcD_out_gg(x1, x2)
GTD_IN_GG(x1, x2)  =  GTD_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

GTD_IN_GG(s(X1), s(X2)) → GTD_IN_GG(X1, X2)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains

(10) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

GTD_IN_GG(s(X1), s(X2)) → GTD_IN_GG(X1, X2)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • GTD_IN_GG(s(X1), s(X2)) → GTD_IN_GG(X1, X2)
    The graph contains the following edges 1 > 1, 2 > 2

(13) YES

(14) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

ADDE_IN_GAG(s(X1), X2, s(X3)) → ADDE_IN_GAG(X1, X2, X3)

The TRS R consists of the following rules:

lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))
addcC_in_gag(X1, X2, X3) → U25_gag(X1, X2, X3, addcE_in_gag(X1, X2, X3))
addcE_in_gag(s(X1), X2, s(X3)) → U23_gag(X1, X2, X3, addcE_in_gag(X1, X2, X3))
addcE_in_gag(0, X1, X1) → addcE_out_gag(0, X1, X1)
U23_gag(X1, X2, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))
U25_gag(X1, X2, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
lecA_in_gg(x1, x2)  =  lecA_in_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
0  =  0
lecA_out_gg(x1, x2)  =  lecA_out_gg(x1, x2)
addcC_in_gag(x1, x2, x3)  =  addcC_in_gag(x1, x3)
U25_gag(x1, x2, x3, x4)  =  U25_gag(x1, x3, x4)
addcE_in_gag(x1, x2, x3)  =  addcE_in_gag(x1, x3)
U23_gag(x1, x2, x3, x4)  =  U23_gag(x1, x3, x4)
addcE_out_gag(x1, x2, x3)  =  addcE_out_gag(x1, x2, x3)
addcC_out_gag(x1, x2, x3)  =  addcC_out_gag(x1, x2, x3)
gtcD_in_gg(x1, x2)  =  gtcD_in_gg(x1, x2)
U24_gg(x1, x2, x3)  =  U24_gg(x1, x2, x3)
gtcD_out_gg(x1, x2)  =  gtcD_out_gg(x1, x2)
ADDE_IN_GAG(x1, x2, x3)  =  ADDE_IN_GAG(x1, x3)

We have to consider all (P,R,Pi)-chains

(15) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

ADDE_IN_GAG(s(X1), X2, s(X3)) → ADDE_IN_GAG(X1, X2, X3)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
ADDE_IN_GAG(x1, x2, x3)  =  ADDE_IN_GAG(x1, x3)

We have to consider all (P,R,Pi)-chains

(17) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ADDE_IN_GAG(s(X1), s(X3)) → ADDE_IN_GAG(X1, X3)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(19) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • ADDE_IN_GAG(s(X1), s(X3)) → ADDE_IN_GAG(X1, X3)
    The graph contains the following edges 1 > 1, 2 > 2

(20) YES

(21) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LEA_IN_GG(s(X1), s(X2)) → LEA_IN_GG(X1, X2)

The TRS R consists of the following rules:

lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))
addcC_in_gag(X1, X2, X3) → U25_gag(X1, X2, X3, addcE_in_gag(X1, X2, X3))
addcE_in_gag(s(X1), X2, s(X3)) → U23_gag(X1, X2, X3, addcE_in_gag(X1, X2, X3))
addcE_in_gag(0, X1, X1) → addcE_out_gag(0, X1, X1)
U23_gag(X1, X2, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))
U25_gag(X1, X2, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
lecA_in_gg(x1, x2)  =  lecA_in_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
0  =  0
lecA_out_gg(x1, x2)  =  lecA_out_gg(x1, x2)
addcC_in_gag(x1, x2, x3)  =  addcC_in_gag(x1, x3)
U25_gag(x1, x2, x3, x4)  =  U25_gag(x1, x3, x4)
addcE_in_gag(x1, x2, x3)  =  addcE_in_gag(x1, x3)
U23_gag(x1, x2, x3, x4)  =  U23_gag(x1, x3, x4)
addcE_out_gag(x1, x2, x3)  =  addcE_out_gag(x1, x2, x3)
addcC_out_gag(x1, x2, x3)  =  addcC_out_gag(x1, x2, x3)
gtcD_in_gg(x1, x2)  =  gtcD_in_gg(x1, x2)
U24_gg(x1, x2, x3)  =  U24_gg(x1, x2, x3)
gtcD_out_gg(x1, x2)  =  gtcD_out_gg(x1, x2)
LEA_IN_GG(x1, x2)  =  LEA_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains

(22) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(23) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LEA_IN_GG(s(X1), s(X2)) → LEA_IN_GG(X1, X2)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains

(24) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(25) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LEA_IN_GG(s(X1), s(X2)) → LEA_IN_GG(X1, X2)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(26) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LEA_IN_GG(s(X1), s(X2)) → LEA_IN_GG(X1, X2)
    The graph contains the following edges 1 > 1, 2 > 2

(27) YES

(28) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

GCDB_IN_GGA(s(X1), s(X2), X3) → U5_GGA(X1, X2, X3, lecA_in_gg(X1, X2))
U5_GGA(X1, X2, X3, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, X3, addcC_in_gag(X1, X4, X2))
U7_GGA(X1, X2, X3, addcC_out_gag(X1, X4, X2)) → GCDB_IN_GGA(s(X1), X4, X3)
GCDB_IN_GGA(X1, s(X2), X3) → U10_GGA(X1, X2, X3, gtcD_in_gg(X1, s(X2)))
U10_GGA(X1, X2, X3, gtcD_out_gg(X1, s(X2))) → U12_GGA(X1, X2, X3, addcE_in_gag(s(X2), X4, X1))
U12_GGA(X1, X2, X3, addcE_out_gag(s(X2), X4, X1)) → GCDB_IN_GGA(s(X2), X4, X3)

The TRS R consists of the following rules:

lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))
addcC_in_gag(X1, X2, X3) → U25_gag(X1, X2, X3, addcE_in_gag(X1, X2, X3))
addcE_in_gag(s(X1), X2, s(X3)) → U23_gag(X1, X2, X3, addcE_in_gag(X1, X2, X3))
addcE_in_gag(0, X1, X1) → addcE_out_gag(0, X1, X1)
U23_gag(X1, X2, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))
U25_gag(X1, X2, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
lecA_in_gg(x1, x2)  =  lecA_in_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
0  =  0
lecA_out_gg(x1, x2)  =  lecA_out_gg(x1, x2)
addcC_in_gag(x1, x2, x3)  =  addcC_in_gag(x1, x3)
U25_gag(x1, x2, x3, x4)  =  U25_gag(x1, x3, x4)
addcE_in_gag(x1, x2, x3)  =  addcE_in_gag(x1, x3)
U23_gag(x1, x2, x3, x4)  =  U23_gag(x1, x3, x4)
addcE_out_gag(x1, x2, x3)  =  addcE_out_gag(x1, x2, x3)
addcC_out_gag(x1, x2, x3)  =  addcC_out_gag(x1, x2, x3)
gtcD_in_gg(x1, x2)  =  gtcD_in_gg(x1, x2)
U24_gg(x1, x2, x3)  =  U24_gg(x1, x2, x3)
gtcD_out_gg(x1, x2)  =  gtcD_out_gg(x1, x2)
GCDB_IN_GGA(x1, x2, x3)  =  GCDB_IN_GGA(x1, x2)
U5_GGA(x1, x2, x3, x4)  =  U5_GGA(x1, x2, x4)
U7_GGA(x1, x2, x3, x4)  =  U7_GGA(x1, x2, x4)
U10_GGA(x1, x2, x3, x4)  =  U10_GGA(x1, x2, x4)
U12_GGA(x1, x2, x3, x4)  =  U12_GGA(x1, x2, x4)

We have to consider all (P,R,Pi)-chains

(29) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(30) Obligation:

Q DP problem:
The TRS P consists of the following rules:

GCDB_IN_GGA(s(X1), s(X2)) → U5_GGA(X1, X2, lecA_in_gg(X1, X2))
U5_GGA(X1, X2, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, addcC_in_gag(X1, X2))
U7_GGA(X1, X2, addcC_out_gag(X1, X4, X2)) → GCDB_IN_GGA(s(X1), X4)
GCDB_IN_GGA(X1, s(X2)) → U10_GGA(X1, X2, gtcD_in_gg(X1, s(X2)))
U10_GGA(X1, X2, gtcD_out_gg(X1, s(X2))) → U12_GGA(X1, X2, addcE_in_gag(s(X2), X1))
U12_GGA(X1, X2, addcE_out_gag(s(X2), X4, X1)) → GCDB_IN_GGA(s(X2), X4)

The TRS R consists of the following rules:

lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))
addcC_in_gag(X1, X3) → U25_gag(X1, X3, addcE_in_gag(X1, X3))
addcE_in_gag(s(X1), s(X3)) → U23_gag(X1, X3, addcE_in_gag(X1, X3))
addcE_in_gag(0, X1) → addcE_out_gag(0, X1, X1)
U23_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))
U25_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))

The set Q consists of the following terms:

lecA_in_gg(x0, x1)
U15_gg(x0, x1, x2)
addcC_in_gag(x0, x1)
addcE_in_gag(x0, x1)
U23_gag(x0, x1, x2)
U25_gag(x0, x1, x2)
gtcD_in_gg(x0, x1)
U24_gg(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(31) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule U5_GGA(X1, X2, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, addcC_in_gag(X1, X2)) at position [2] we obtained the following new rules [LPAR04]:

U5_GGA(X1, X2, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, U25_gag(X1, X2, addcE_in_gag(X1, X2)))

(32) Obligation:

Q DP problem:
The TRS P consists of the following rules:

GCDB_IN_GGA(s(X1), s(X2)) → U5_GGA(X1, X2, lecA_in_gg(X1, X2))
U7_GGA(X1, X2, addcC_out_gag(X1, X4, X2)) → GCDB_IN_GGA(s(X1), X4)
GCDB_IN_GGA(X1, s(X2)) → U10_GGA(X1, X2, gtcD_in_gg(X1, s(X2)))
U10_GGA(X1, X2, gtcD_out_gg(X1, s(X2))) → U12_GGA(X1, X2, addcE_in_gag(s(X2), X1))
U12_GGA(X1, X2, addcE_out_gag(s(X2), X4, X1)) → GCDB_IN_GGA(s(X2), X4)
U5_GGA(X1, X2, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, U25_gag(X1, X2, addcE_in_gag(X1, X2)))

The TRS R consists of the following rules:

lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))
addcC_in_gag(X1, X3) → U25_gag(X1, X3, addcE_in_gag(X1, X3))
addcE_in_gag(s(X1), s(X3)) → U23_gag(X1, X3, addcE_in_gag(X1, X3))
addcE_in_gag(0, X1) → addcE_out_gag(0, X1, X1)
U23_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))
U25_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))

The set Q consists of the following terms:

lecA_in_gg(x0, x1)
U15_gg(x0, x1, x2)
addcC_in_gag(x0, x1)
addcE_in_gag(x0, x1)
U23_gag(x0, x1, x2)
U25_gag(x0, x1, x2)
gtcD_in_gg(x0, x1)
U24_gg(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(33) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(34) Obligation:

Q DP problem:
The TRS P consists of the following rules:

GCDB_IN_GGA(s(X1), s(X2)) → U5_GGA(X1, X2, lecA_in_gg(X1, X2))
U7_GGA(X1, X2, addcC_out_gag(X1, X4, X2)) → GCDB_IN_GGA(s(X1), X4)
GCDB_IN_GGA(X1, s(X2)) → U10_GGA(X1, X2, gtcD_in_gg(X1, s(X2)))
U10_GGA(X1, X2, gtcD_out_gg(X1, s(X2))) → U12_GGA(X1, X2, addcE_in_gag(s(X2), X1))
U12_GGA(X1, X2, addcE_out_gag(s(X2), X4, X1)) → GCDB_IN_GGA(s(X2), X4)
U5_GGA(X1, X2, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, U25_gag(X1, X2, addcE_in_gag(X1, X2)))

The TRS R consists of the following rules:

addcE_in_gag(s(X1), s(X3)) → U23_gag(X1, X3, addcE_in_gag(X1, X3))
addcE_in_gag(0, X1) → addcE_out_gag(0, X1, X1)
U25_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
U23_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))
gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))
lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))

The set Q consists of the following terms:

lecA_in_gg(x0, x1)
U15_gg(x0, x1, x2)
addcC_in_gag(x0, x1)
addcE_in_gag(x0, x1)
U23_gag(x0, x1, x2)
U25_gag(x0, x1, x2)
gtcD_in_gg(x0, x1)
U24_gg(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(35) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

addcC_in_gag(x0, x1)

(36) Obligation:

Q DP problem:
The TRS P consists of the following rules:

GCDB_IN_GGA(s(X1), s(X2)) → U5_GGA(X1, X2, lecA_in_gg(X1, X2))
U7_GGA(X1, X2, addcC_out_gag(X1, X4, X2)) → GCDB_IN_GGA(s(X1), X4)
GCDB_IN_GGA(X1, s(X2)) → U10_GGA(X1, X2, gtcD_in_gg(X1, s(X2)))
U10_GGA(X1, X2, gtcD_out_gg(X1, s(X2))) → U12_GGA(X1, X2, addcE_in_gag(s(X2), X1))
U12_GGA(X1, X2, addcE_out_gag(s(X2), X4, X1)) → GCDB_IN_GGA(s(X2), X4)
U5_GGA(X1, X2, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, U25_gag(X1, X2, addcE_in_gag(X1, X2)))

The TRS R consists of the following rules:

addcE_in_gag(s(X1), s(X3)) → U23_gag(X1, X3, addcE_in_gag(X1, X3))
addcE_in_gag(0, X1) → addcE_out_gag(0, X1, X1)
U25_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
U23_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))
gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))
lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))

The set Q consists of the following terms:

lecA_in_gg(x0, x1)
U15_gg(x0, x1, x2)
addcE_in_gag(x0, x1)
U23_gag(x0, x1, x2)
U25_gag(x0, x1, x2)
gtcD_in_gg(x0, x1)
U24_gg(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(37) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


U10_GGA(X1, X2, gtcD_out_gg(X1, s(X2))) → U12_GGA(X1, X2, addcE_in_gag(s(X2), X1))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(GCDB_IN_GGA(x1, x2)) = x1   
POL(U10_GGA(x1, x2, x3)) = x3   
POL(U12_GGA(x1, x2, x3)) = 1 + x2   
POL(U15_gg(x1, x2, x3)) = 0   
POL(U23_gag(x1, x2, x3)) = 0   
POL(U24_gg(x1, x2, x3)) = 1 + x3   
POL(U25_gag(x1, x2, x3)) = 0   
POL(U5_GGA(x1, x2, x3)) = 1 + x1   
POL(U7_GGA(x1, x2, x3)) = 1 + x1   
POL(addcC_out_gag(x1, x2, x3)) = 0   
POL(addcE_in_gag(x1, x2)) = 0   
POL(addcE_out_gag(x1, x2, x3)) = 0   
POL(gtcD_in_gg(x1, x2)) = x1   
POL(gtcD_out_gg(x1, x2)) = 1 + x2   
POL(lecA_in_gg(x1, x2)) = 0   
POL(lecA_out_gg(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))

(38) Obligation:

Q DP problem:
The TRS P consists of the following rules:

GCDB_IN_GGA(s(X1), s(X2)) → U5_GGA(X1, X2, lecA_in_gg(X1, X2))
U7_GGA(X1, X2, addcC_out_gag(X1, X4, X2)) → GCDB_IN_GGA(s(X1), X4)
GCDB_IN_GGA(X1, s(X2)) → U10_GGA(X1, X2, gtcD_in_gg(X1, s(X2)))
U12_GGA(X1, X2, addcE_out_gag(s(X2), X4, X1)) → GCDB_IN_GGA(s(X2), X4)
U5_GGA(X1, X2, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, U25_gag(X1, X2, addcE_in_gag(X1, X2)))

The TRS R consists of the following rules:

addcE_in_gag(s(X1), s(X3)) → U23_gag(X1, X3, addcE_in_gag(X1, X3))
addcE_in_gag(0, X1) → addcE_out_gag(0, X1, X1)
U25_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
U23_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))
gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))
lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))

The set Q consists of the following terms:

lecA_in_gg(x0, x1)
U15_gg(x0, x1, x2)
addcE_in_gag(x0, x1)
U23_gag(x0, x1, x2)
U25_gag(x0, x1, x2)
gtcD_in_gg(x0, x1)
U24_gg(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(39) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes.

(40) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U5_GGA(X1, X2, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, U25_gag(X1, X2, addcE_in_gag(X1, X2)))
U7_GGA(X1, X2, addcC_out_gag(X1, X4, X2)) → GCDB_IN_GGA(s(X1), X4)
GCDB_IN_GGA(s(X1), s(X2)) → U5_GGA(X1, X2, lecA_in_gg(X1, X2))

The TRS R consists of the following rules:

addcE_in_gag(s(X1), s(X3)) → U23_gag(X1, X3, addcE_in_gag(X1, X3))
addcE_in_gag(0, X1) → addcE_out_gag(0, X1, X1)
U25_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
U23_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))
gtcD_in_gg(s(X1), s(X2)) → U24_gg(X1, X2, gtcD_in_gg(X1, X2))
gtcD_in_gg(s(X1), 0) → gtcD_out_gg(s(X1), 0)
U24_gg(X1, X2, gtcD_out_gg(X1, X2)) → gtcD_out_gg(s(X1), s(X2))
lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))

The set Q consists of the following terms:

lecA_in_gg(x0, x1)
U15_gg(x0, x1, x2)
addcE_in_gag(x0, x1)
U23_gag(x0, x1, x2)
U25_gag(x0, x1, x2)
gtcD_in_gg(x0, x1)
U24_gg(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(41) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(42) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U5_GGA(X1, X2, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, U25_gag(X1, X2, addcE_in_gag(X1, X2)))
U7_GGA(X1, X2, addcC_out_gag(X1, X4, X2)) → GCDB_IN_GGA(s(X1), X4)
GCDB_IN_GGA(s(X1), s(X2)) → U5_GGA(X1, X2, lecA_in_gg(X1, X2))

The TRS R consists of the following rules:

lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))
addcE_in_gag(s(X1), s(X3)) → U23_gag(X1, X3, addcE_in_gag(X1, X3))
addcE_in_gag(0, X1) → addcE_out_gag(0, X1, X1)
U25_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
U23_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))

The set Q consists of the following terms:

lecA_in_gg(x0, x1)
U15_gg(x0, x1, x2)
addcE_in_gag(x0, x1)
U23_gag(x0, x1, x2)
U25_gag(x0, x1, x2)
gtcD_in_gg(x0, x1)
U24_gg(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(43) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

gtcD_in_gg(x0, x1)
U24_gg(x0, x1, x2)

(44) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U5_GGA(X1, X2, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, U25_gag(X1, X2, addcE_in_gag(X1, X2)))
U7_GGA(X1, X2, addcC_out_gag(X1, X4, X2)) → GCDB_IN_GGA(s(X1), X4)
GCDB_IN_GGA(s(X1), s(X2)) → U5_GGA(X1, X2, lecA_in_gg(X1, X2))

The TRS R consists of the following rules:

lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))
addcE_in_gag(s(X1), s(X3)) → U23_gag(X1, X3, addcE_in_gag(X1, X3))
addcE_in_gag(0, X1) → addcE_out_gag(0, X1, X1)
U25_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
U23_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))

The set Q consists of the following terms:

lecA_in_gg(x0, x1)
U15_gg(x0, x1, x2)
addcE_in_gag(x0, x1)
U23_gag(x0, x1, x2)
U25_gag(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(45) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


GCDB_IN_GGA(s(X1), s(X2)) → U5_GGA(X1, X2, lecA_in_gg(X1, X2))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(GCDB_IN_GGA(x1, x2)) = x2   
POL(U15_gg(x1, x2, x3)) = 0   
POL(U23_gag(x1, x2, x3)) = x3   
POL(U25_gag(x1, x2, x3)) = x3   
POL(U5_GGA(x1, x2, x3)) = x2   
POL(U7_GGA(x1, x2, x3)) = x3   
POL(addcC_out_gag(x1, x2, x3)) = x2   
POL(addcE_in_gag(x1, x2)) = x2   
POL(addcE_out_gag(x1, x2, x3)) = x2   
POL(lecA_in_gg(x1, x2)) = 0   
POL(lecA_out_gg(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:

addcE_in_gag(s(X1), s(X3)) → U23_gag(X1, X3, addcE_in_gag(X1, X3))
addcE_in_gag(0, X1) → addcE_out_gag(0, X1, X1)
U25_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
U23_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))

(46) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U5_GGA(X1, X2, lecA_out_gg(X1, X2)) → U7_GGA(X1, X2, U25_gag(X1, X2, addcE_in_gag(X1, X2)))
U7_GGA(X1, X2, addcC_out_gag(X1, X4, X2)) → GCDB_IN_GGA(s(X1), X4)

The TRS R consists of the following rules:

lecA_in_gg(s(X1), s(X2)) → U15_gg(X1, X2, lecA_in_gg(X1, X2))
lecA_in_gg(0, s(X1)) → lecA_out_gg(0, s(X1))
lecA_in_gg(0, 0) → lecA_out_gg(0, 0)
U15_gg(X1, X2, lecA_out_gg(X1, X2)) → lecA_out_gg(s(X1), s(X2))
addcE_in_gag(s(X1), s(X3)) → U23_gag(X1, X3, addcE_in_gag(X1, X3))
addcE_in_gag(0, X1) → addcE_out_gag(0, X1, X1)
U25_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcC_out_gag(X1, X2, X3)
U23_gag(X1, X3, addcE_out_gag(X1, X2, X3)) → addcE_out_gag(s(X1), X2, s(X3))

The set Q consists of the following terms:

lecA_in_gg(x0, x1)
U15_gg(x0, x1, x2)
addcE_in_gag(x0, x1)
U23_gag(x0, x1, x2)
U25_gag(x0, x1, x2)

We have to consider all (P,Q,R)-chains.

(47) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 2 less nodes.

(48) TRUE